<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script type="text/javascript" src="../../zxt/zxt.js"></script>
  <script>
    	importZXT("../../zxt");
  </script>
	
</head>

<body>
	<table>
		<tr>
			<td><div id="check2" zxt="zxt.ui.Checkbox" zxt.value="1" zxt.check="1" zxt.uncheck="0"></div></td>
			<td><input type="button" value="getValue" onclick="alert($zxtUI.check2.getValue())"/></td>
		</tr>
		<tr>
			<td><div id="check1" zxt="zxt.ui.Checkbox" zxt.value="0" zxt.check="1" zxt.uncheck="0"></div></td>
			<td><input type="button" value="setCheck" onclick="setValue()"/></td>
		</tr>
	</table>
	
	<table>
			<tr>
				<td>getType()</td>
				<td>返回控件类型</td>
				<td><input type="button" name="getType" value="getType" 
					onclick="alert('勾选控件的type为'+$zxtUI.check1.getType());"/></td>
			</tr>
			<tr>
				<td>getMask()</td>
				<td> [MASK]模式下显示勾选控件的值</td>
				<td><input type="button" name="getMask" value="getMask" 
					onclick="alert('勾选控件的getMask为'+$zxtUI.check1.getMask());"/></td>
			</tr>
			<tr>
				<td>getSelfLabel()</td>
				<td>返回勾选控件的LABEL</td>
				<td><input type="button" name="getSelfLabel" value="getSelfLabel" 
					onclick="alert('勾选控件的getSelfLabel为'+$zxtUI.check1.getSelfLabel());"/></td>
			</tr>
			<tr>
				<td>getSelfValue()</td>
				<td>返回勾选控件的值</td>
				<td><input type="button" name="getSelfValue" value="getSelfValue" 
					onclick="alert('勾选控件的getSelfValue为'+$zxtUI.check1.getSelfValue());"/></td>
			</tr>
	</table>
	<div><a href="../index.html">返回</a></div>
</body>

</html>


<script>  
	$zxt.init();
	$zxtUI["check1"].mode("LABEL");
	$zxtUI["check1"].render();
	
	function setValue(){
		$zxtUI["check1"].renderValue("1");
	}
	
	$zxtUI.check2.onValueChange = function(o,n){
		alert(n);
	}
</script> 	